package com.awphone.data;

import com.awphone.data.constant.CountryConst;
import com.awphone.data.constant.EObjectType;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author a_polyakov
 * Date: 03.03.13
 * Time: 22:35
 * Страна
 */
@Entity
@Table(schema = CountryConst.SCHEMA_NAME, name = CountryConst.TABLE_NAME)
public class Country extends AbstractObject {
    /**
     * Наименование
     */
    private String name;
    /**
     * Часовой пояс
     */
    private Integer timeZone;

    {
        setObjectType(EObjectType.COUNTRY);
    }

    public Country() {
    }

    @Column(name = CountryConst.S_NAME, nullable = false, unique = true)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = CountryConst.S_TIME_ZONE)
    public Integer getTimeZone() {
        return timeZone;
    }

    public void setTimeZone(Integer timeZone) {
        this.timeZone = timeZone;
    }
}
